home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today (Latin America) Volume 1 #6 / CD-ROM Today 6 Latam.iso / referenc / evol / database.dxr / 00142_Trace preper & loader.ls < prev    next >
Encoding:
Text File  |  1996-11-08  |  1.0 KB  |  37 lines

  1. on PrepTrace
  2.   global gDBtrace
  3.   set gDBtrace to [[1, "Fossils"], [2, "Natural Design"], [3, "Creative Evolution"]]
  4. end
  5.  
  6. on LoadTrace
  7.   global gDBtrace, gColorList, gTraceMem
  8.   repeat with traceE in gDBtrace
  9.     set oldwc to the number of words in field gTraceMem
  10.     if stringp(traceE) then
  11.       set NextEntry to "- " & traceE & RETURN
  12.       next repeat
  13.     end if
  14.     if listp(traceE) then
  15.       set TraceFlag to getAt(traceE, 1)
  16.       if TraceFlag <= 4 then
  17.         set NextEntry to "- " & getAt(traceE, 2) & RETURN
  18.       else
  19.         set NextEntry to "-       " & getAt(traceE, 2) & RETURN
  20.       end if
  21.       put NextEntry after field gTraceMem
  22.       set wc to the number of words in field gTraceMem
  23.       if getAt(traceE, 2) = "contents" then
  24.         set the foreColor of word wc of field gTraceMem to 254
  25.       else
  26.         repeat with K = oldwc + 2 to wc
  27.           set the foreColor of word K of field gTraceMem to getAt(gColorList, TraceFlag)
  28.         end repeat
  29.       end if
  30.       next repeat
  31.     end if
  32.     beep()
  33.     beep()
  34.     beep()
  35.   end repeat
  36. end
  37.